package cz.cvut.fit.web.nakupniSeznam.ws.conv;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import cz.cvut.fit.web.nakupniSeznam.data.User;

@XmlRootElement(name = "user")
@XmlType(propOrder = { "key" })
public class UserConverter {

	public UserConverter() {
		user = new User();
	}

	public UserConverter(User user) {
		super();
		this.user = user;
	}

	private User user;

	@XmlElement
	public String getKey() {
		return user.getKey();
	}

	public void setKey(String key) {
		this.user.setKey(key);
	}

	public User retrieveRepresentation() {
		return user;
	}

}
